Skip to content

Export a board to PDF, one page per area or the whole board on one page - #93

Closed
marcosqlbi wants to merge 10 commits into
feature/export-e1-powerpointfrom
feature/export-e2-pdf
Closed

Export a board to PDF, one page per area or the whole board on one page#93
marcosqlbi wants to merge 10 commits into
feature/export-e1-powerpointfrom
feature/export-e2-pdf

Conversation

@marcosqlbi

Copy link
Copy Markdown
Collaborator

Why

Phase E2 of docs/export.md, on top of #92 (this pull request's base is the E1 branch; retarget it to main once #92 merges). A deck suits a presenter; a PDF suits an attendee who wants to read, print, or zoom, and PDF has the one freedom a slide lacks: a page of any size.

What it does

  • PDF is a choice in the same Export dialog. The dialog relabels itself (pages rather than slides), hides the slide size and the notes switch, and shows the page size (A4 or Letter, landscape) and a footer switch. The areas and the preview are exactly those of the deck, so a deck and a PDF of the same board agree.
  • One page per area: the area's picture under a header line with its title, a bookmark per page, and a footer with the board name, the date, and "n of m". The overview page comes first when there are at least two areas.
  • Whole board on one page: a single page the shape of the board, rendered at up to 6000 pixels on the longer edge and sized at 144 dpi (a 41-inch page for a 6000-pixel board, under the 200-inch limit viewers enforce). No header or footer: the page is the board.

Where the code is

  • SQLBI.Whiteboard.Export/PdfDocumentWriter.cs over PdfSharp 6.2.4 (MIT, managed-only, per decision 21). Fonts are read from the Windows fonts folder through a small resolver, since PDFsharp's Core build brings none.
  • ExportSettings gains the format, page size, and footer; BoardExporter branches on the format and renders the poster larger; the dialog gains the PDF controls.
  • Smoke tests read the produced PDF back: page count, A4 landscape size, one bookmark per page, and the fit-to-picture page size.

The smaller calls are listed under E2 in docs/export-decisions.md; decision 26 is updated.

🤖 Generated with Claude Code

The same areas the deck uses, as a PDF: one A4 or Letter landscape page
per area with a header line, a bookmark, and a footer carrying the board
name, the date, and the page number; or the whole board on one page the
shape of the board, rendered at up to 6000 pixels on the longer edge, for
a reader who zooms. PDF is a choice in the same Export dialog, which
relabels itself from slides to pages.

PdfSharp (MIT, managed-only) writes the file, with Segoe UI read from
the Windows fonts folder because its Core build brings no fonts. The
smoke tests read the produced document back for page count, page size,
and outline entries.

Co-Authored-By: Claude Fable 5.1 <[email protected]>
@marcosqlbi
marcosqlbi deleted the branch feature/export-e1-powerpoint September 3, 2026 18:25
@marcosqlbi marcosqlbi closed this Sep 3, 2026
@marcosqlbi

Copy link
Copy Markdown
Collaborator Author

Closed by GitHub when the base branch was deleted after #92 merged. Continued as #97 against main.

marcosqlbi added a commit that referenced this pull request Sep 3, 2026
…ge (#97)

## Why

Phase E2 of [docs/export.md](docs/export.md), on top of the PowerPoint
export merged in #92. A deck suits a presenter; a PDF suits an attendee
who wants to read, print, or zoom, and PDF has the one freedom a slide
lacks: a page of any size. Replaces #93, which GitHub closed when its
base branch was deleted after the merge.

## What it does

- **PDF is a choice in the same Export dialog.** The dialog relabels
itself (pages rather than slides), hides the slide size and the notes
switch, and shows the page size (A4 or Letter, landscape) and a footer
switch. The areas and the preview are exactly those of the deck, so a
deck and a PDF of the same board agree.
- **One page per area**: the area's picture under a header line with its
title, a bookmark per page, and a footer with the board name, the date,
and "n of m". The overview page comes first when there are at least two
areas.
- **Whole board on one page**: a single page the shape of the board,
rendered at up to 6000 pixels on the longer edge and sized at 144 dpi (a
41-inch page for a 6000-pixel board, under the 200-inch limit viewers
enforce). No header or footer: the page is the board.

## Where the code is

- `SQLBI.Whiteboard.Export/PdfDocumentWriter.cs` over `PdfSharp` 6.2.4
(MIT, managed-only, per decision 21). Fonts are read from the Windows
fonts folder through a small resolver, since PDFsharp's Core build
brings none.
- `ExportSettings` gains the format, page size, and footer;
`BoardExporter` branches on the format and renders the poster larger;
the dialog gains the PDF controls.
- Smoke tests read the produced PDF back: page count, A4 landscape size,
one bookmark per page, and the fit-to-picture page size.

The smaller calls are listed under E2 in
[docs/export-decisions.md](docs/export-decisions.md); decision 26 is
updated, and the 1.3.0 release notes gain their PDF entry.

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-authored-by: Claude Fable 5.1 <[email protected]>
marcosqlbi added a commit that referenced this pull request Sep 3, 2026
#94)

## Why

Phase E3 of [docs/export.md](docs/export.md), on top of #93 (base is the
E2 branch; retarget to `main` once it merges). A picture slide is exact
but dead: a person who wants to rework a deck after a session needs the
DAX to be text and the pictures to be pictures.

## What it does

- **Slide content: Picture or Editable**, a choice on the Export dialog
for PowerPoint. Picture stays the default because it is exact; Editable
is best effort by design.
- **Editable** puts each image on the slide as a picture (PNG and JPEG
bytes as they are, sniffed rather than trusted to the stored content
type; SVG, BMP, and GIF rasterized at the size they take on the slide
through the code the clipboard uses), each text container as a rounded
text box with the language service's title as its first line and the
body as runs carrying the syntax colors and weights the screen shows, a
LiveView as its current frame, and all the ink as one transparent PNG
over everything.
- **Placement is identical to the picture mode**: the rasterizer exposes
the camera it would have used, and every element is mapped through it
into the same picture box.

## Where the code is

- `SQLBI.Whiteboard.Export/ExportPage.cs`: the element model
(`SlideImageElement`, `SlideTextElement`), in page pixel space.
- `PptxDeckWriter`: a slide with elements gets one shape per element in
z-order; the single-picture path is unchanged.
- `SQLBI.Whiteboard/Export/EditableSlide.cs`: builds the elements from
an area; `BoardSurface` gains `DrawBackground` and `ObjectFilter` for
the ink overlay.
- Smoke tests write an editable slide and check its pictures, text box,
runs, and image parts.

The smaller calls are under E3 in
[docs/export-decisions.md](docs/export-decisions.md); decision 26 is
updated.

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-authored-by: Claude Fable 5.1 <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant